package org.someone.theday.service.impl;

import java.util.List;

import org.someone.theday.dao.UserMapper;
import org.someone.theday.model.User;
import org.someone.theday.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service("UserService") 
public class UserServiceImpl implements UserService {
	
	@Autowired  
    private UserMapper userMapper;

	public User getUserById(int id) {
		return userMapper.selectByPrimaryKey(id);
	}

	public int insert(User userInfo) {
		int result = userMapper.insert(userInfo);
		return result;
	}

	public List<User> getUsers() {
		return userMapper.selectUser();
	}

}
